-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix nws blocking startup #117094
Fix nws blocking startup #117094
Conversation
Hey there @kamiyo, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
@@ -128,6 +148,17 @@ async def update_forecast_hourly() -> None: | |||
await coordinator_forecast.async_refresh() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the future: Sometimes its faster to do an asyncio.gather
here (with create_eager_task
)
It will depend on if more connections is slower or faster with the remote server
example
core/homeassistant/bootstrap.py
Line 430 in 189c07d
create_eager_task(async_setup_component(hass, domain, config)) |
If the server doesn't like more connections at once it can be slower though so it has to be tested to see the result
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I had to guess, NWS won't like multiple connections, but I can look into testing.
Co-authored-by: J. Nick Koston <nick@koston.org>
Thanks @MatthewFlamm |
Proposed change
This PR fixes startup blocking introduced by #115857.
Coordinators are first setup to do no retrying within the entry setup. Then the update method is updated to include retries after that.
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: